🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / app / src / main / java / com / geeksville / mesh / model / BluetoothViewModel.kt
Displaying Raw • Download
app/src/main/java/com/geeksville/mesh/model/BluetoothViewModel.kt ui_message_list (be3f882f) Text, 1.40 KB
T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787com.geeksville.mesh.model
Tff7b72import T7ee787androidx.lifecycle.ViewModel
Tff7b72import T7ee787com.geeksville.mesh.repository.bluetooth.BluetoothRepository
Tff7b72import T7ee787dagger.hilt.android.lifecycle.HiltViewModel
Tff7b72import T7ee787kotlinx.coroutines.flow.map
Tff7b72import T7ee787javax.inject.Inject
T8b949e/** Thin view model which adapts the view layer to the `BluetoothRepository`. */
Tf0883e@HiltViewModel
Tff7b72class T56d364BluetoothViewModel Tf0883e@Inject Tff7b72constructorTb4b4b4(Tff7b72private Tff7b72val Te6edf3bluetoothRepositoryTb4b4b4: Te6edf3BluetoothRepositoryTb4b4b4) Tb4b4b4: Te6edf3ViewModelTb4b4b4(Tb4b4b4) Tb4b4b4{
T8b949e/** Called when permissions have been updated. This causes an explicit refresh of the bluetooth state. */
Tff7b72fun Td2a8ffpermissionsUpdatedTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3bluetoothRepositoryTb4b4b4.Te6edf3refreshStateTb4b4b4(Tb4b4b4)
Tff7b72val Te6edf3enabled Tff7b72= Te6edf3bluetoothRepositoryTb4b4b4.Te6edf3stateTb4b4b4.Te6edf3map Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3enabled Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s